import { tableHeader } from "../purchase-receipt/data";

export const purTableHeader: tableHeader = {
  transactionType: "事务处理类型",
  transactionProcessTime: "事务处理时间",
  sourceCode: "来源",
  sourceType: "来源类型",
  org: "组织代码",
  subInventoryCode: "子库房",
  targetOrg: "转移组织",
  targetInventory: "转移库房",
  createdBy: "创建人",
  transactionId: "事务id",
  materialCode: "物料代码",
  materialDesc: "物料描述",
  materialUnit: "物料单位",
  amount: "数量",
  unitCost: "基础价格",
  totalCost: "金额",
};
export const purTableProps = Object.keys(purTableHeader);
// export const engThInit = Object.keys(purTableHeader);
export const journalTableHeader: tableHeader = {
  account: "账户",
  accountDesc: "账户描述",
  accountingType: "会计类型",
  accountingTypeDesc: "会计类型",
  amount: "数量",
  businessId: "业务ID",
  journalType: "",
  materialCode: "物料编码",
  materialDesc: "物料描述",
  org: "组织",
  totalPrice: "事务处理值",
  transactionProcessTime: "事务处理时间",
  transactionType: "事务处理类型",
  materialUnit: "单位",
  unitCost: "基础价格",
  totalCost: "金额",
};
export const journalTableProps = Object.keys(journalTableHeader);
// [
//   "transactionProcessTime",
//   "account",
//   "accountDesc",
//   "materialCode",
//   "materialDesc",
//   "unit",
//   "amount",
//   "unitCost",
//   "totalPrice",
//   "accountingTypeDesc",
// ];
export enum accountingTypeEnum {
  "入库检验" = 1,
  "库存估价" = 2,
  "采购价格差异或汇率差异" = 3,
}
export const handleItem = (key: any, value: any) => {
  if (key === "accountingType") {
    return accountingTypeEnum[value];
  } else {
    return value;
  }
};
